<#-- 导入变量定义文件 -->
<#include "../template/include/assign.ftl">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>操作员列表页</title>
<#-- 导入静态资源文件 -->
<#include "../template/include/source.ftl">
<link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.page{
		float:right;
		padding-top: 15px;
		margin-right: 15px;
	}
</style>
</head>
<#include "../template/template_listPage.ftl">
<body class="list">
	<script type="text/javascript">
	$().ready( function() {
		<#if actionErrors??&&(actionErrors?size > 0)>
			$.dialog({type: "warn", content: "<#list errorMessages as list>${list}<br></#list>",
			 modal: true, autoCloseTime: 3000});
		</#if>
	
	});
	
	function deleterRole(id){
	 var result = confirm("你确认要删除吗?");
	 if (result) {
		var url="${web_base}/system/role!delete.htm?id="+id;
		document.forms[0].action=url;
		document.forms[0].submit();
	}
    }
	</script>
	<div class="body">
		<div class="listBar">
			<h1><span class="icon">&nbsp;</span>角色列表&nbsp;<input type="button" class="addButton" onclick="location.href='${web_base}/system/role!add.htm'" value="添加角色" /></h1>
		</div>
		<@pageList page=(page!) id="listForm" query="roleQuery" isEmpty=true >
		<div class="operateBar">
			<label>角色名称:</label>
			<input type="text" name="roleQuery.name" value="${(roleQuery.name)!}" /></label><input type="submit" id="searchButton" class="searchButton" value="" />
		</div>		
		<table class="listTable">
			<tr>
				<th>
					<span class="sort" name="name">角色名称</span>
				</th>
				<th>
					操作
				</th>								
			</tr>
		<#if  page??&&page.list??&&(page.list?size gt 0) >
		<#list page.list as entry>
			<tr>
				<td>
					${(entry.name)!}
				</td>
				<td>
					<a href="${web_base}/system/role!edit.htm?id=${(entry.id)!}" title="编辑">[编辑]</a>
					<a href="javascript:void(0);" onclick="deleterRole('${(entry.id)!}');" title="删除">[删除]</a>
				</td>				
			</tr>
		</#list>
		<#else>
		    <tr><td colspan="9">
			<div class="noRecord">
				没有找到任何记录!
			</div>	
			</td></tr>
		</#if>
		</table>
		</@pageList>
	</div>
</body>
